//装备灵宝 {"序列":1,"目标":1,"类型":"灵宝"}
// @ts-ignore
export async function execute(client_id,message_json) {
    let characters = G.Characters.get_current_login_characters(client_id);
    let index = message_json["序列"] - 1;
    let target_index = message_json["目标"] - 1;
    let lb = characters["灵宝"][index];
    if (lb === undefined || lb === null) {
        ClientUtils.send_basic_prompt(client_id, "灵宝不存在");
    }
    let target = characters["灵宝佩戴"][target_index];
    if (target === undefined || target === null) {
        characters["灵宝佩戴"][target_index] = lb;
        characters["灵宝"][index] = null;
    } else {
        let tmp_target = Object.assign({}, target);
        characters["灵宝佩戴"][target_index] = lb;
        characters["灵宝"][index] = tmp_target;
    }
    G.Characters.refrush_fabao_data(characters);
}